#include <exception>
#include <iostream>
#include <stddef.h>
#include <new>
#include <pthread.h>
#include <string>
#include <type_traits>
using namespace std;
template<class T1,class T2>
class Pair
{
	public:
		T1 key;
		T2 value;
		Pair(T1 k,T2 v):key(k),value(v){};
		bool operator<(const Pair<T1,T2>&p)const;
};
template <class T1,class T2>
bool Pair<T1, T2>::operator<(const Pair<T1, T2>&p)const
{
	return this->key<p.key;
}


template<class T3,class T4>
class Set{
	private:
		T3 index;
		T4 val;
	public:
		Set(T3 i,T4 va):index(i),val(va){};
		void Print(){
			cout<<this->index<<' '<<this->val<<endl;
		}
};

template <class T>
class A{
	public:
		template<class T5>
			void Fun(T5 t){
				cout<<t<<endl;
			}
};
int main()
{
	Pair<string,int>student("Jiayu",31);
	cout<<student.key<<' '<<student.value<<endl;
	Set<string,int>teacher("Bingsong",19);
	teacher.Print();

	A<int>test;
	test.Fun("Hello world!");
	return 0;
}
